class CQueue {
public:
    CQueue() {

    }
    
    void appendTail(int value) {
        in.push(value);
    }
    
    int deleteHead() {
        if(out.empty()){
            if(in.empty())
                return -1;
                change();

        }
        int value = out.top();
        out.pop();
        return value;
    }
private:

    stack<int> in ,out;

    void change() {
        while (!in.empty()) {
            out.push(in.top());
            in.pop();


}
    }
    };

